package com.thread.book.book2;

import java.util.concurrent.TimeUnit;

public class Book03 {

    public static void main(String[] args) {
        Thread thread = new Thread(new DeamonRunnenr(), "deamon");
        thread.setDaemon(true);
        thread.start();
    }

    static class DeamonRunnenr implements Runnable {
        @Override
        public void run() {
            try {
                Thread.sleep(10);
            } catch (InterruptedException e) {
                e.printStackTrace();
            } finally {
                System.out.println("DaemonThread finally run");
            }
        }
    }
}



